The MCP Python Tool allows AI in your Playlab apps to write and execute real Python code during a conversation. Instead of generating code for users to run elsewhere, the AI writes code, executes it in a secure sandbox, reads the output, and returns the actual result, all within a single turn.
This is an MCP tool. AI models that do not support Model Context Protocol will not be able to execute code when this tool is enabled. Ensure your selected model supports MCP before enabling.
Language models are probabilistic: they predict likely outputs based on patterns, which makes them powerful for language tasks but unreliable for precise computation. Math, data aggregation, and file generation require deterministic execution, where the same input always produces the same correct output. Python code provides that guarantee. By combining LLM reasoning with actual code execution, the Python Tool lets AI handle the logic and language while Python handles the numbers. This is especially important in education, where grade calculations, data summaries, and generated reports need to be accurate, not approximate.
Navigate to your appโs Tools panel and, under Create & Share, toggle on the Python Tool. It will appear in the tools list with a < > icon and the description: โRun code to make calculations, analyse data, create plots, and more (can access CSV, JSON, and XLSX file attachments).โ
If you do not see the Python Tool option, your organization may not yet have access. Contact support@playlab.ai to request early access.
2
Select an MCP-Compatible Model
Ensure your app is using an AI model that supports MCP tool calls. Recommended models:
Claude Sonnet 4.6: strong balance of reasoning and execution speed
GPT 5.4: excellent for data analysis and structured outputs
Gemini 3.1 Pro: high accuracy with complex multi-step computations
Gemini 3.5 Flash: frontier-tier coding performance at Flash-tier speed, well suited for multi-step Python workflows
Models that do not support MCP will not be able to use this tool.
3
Add to Your App's Instructions
Add lines to your appโs Instructions to help the AI know when and how to use the tool:
You have access to a Python Tool. When users ask questions that involve calculations, data analysis, file processing, or generating structured outputs, use this tool to write and execute Python code. Always show the user what you computed and explain the result in plain language. If the code produces a file, offer it as a download.
4
Test with a Sample Task
Try a query that exercises the tool end-to-end. Good starter prompts:
โA student scored 78, 84, 91, and 65 on four assignments. What is their average grade?โ
โIโll upload my class roster as a CSV. Can you group students by reading level and count how many are in each group?โ
โGenerate a bar chart of quiz scores by class period and export it as an imageโ
Here are a few ideas to get you started, but donโt stop here. The best way to discover whatโs possible is to play around and experiment. Describe whaat you want and try things youโre not sure will work, and see what happens.
Grading & Scoring
Grade calculations require exact arithmetic. The Python Tool computes weighted averages, flags students below thresholds, and exports a formatted gradebook with no rounding errors and no hallucinated scores.
Data Analysis
LLMs summarize data in words; Python actually counts it. Upload attendance records or survey results and get real aggregates grouped, filtered, and sorted correctly every time.
Report Generation
Generating a structured XLSX or CSV from data is not something a language model can do reliably on its own. The Python Tool writes and runs the code that builds the file and hands it back as a download.
Math & Computation
Multi-step calculations are where LLMs drift. Python executes them exactly, useful for checking student work, running statistical analyses, or computing results that need to be verifiably correct.
Data Visualization
Charts require precise data bindings that LLMs cannot render. Python generates accurate bar charts, line graphs, and scatter plots from real data and exports them as images ready to use in slides or handouts.
Lesson Material Generation
Turn a structured outline or dataset into a formatted .docx with headers, tables, and content blocks. Teachers get an editable Word file, not a block of text to copy and paste.
PowerPoint Generation
Python builds .pptx files with real slide structure. Feed it a lesson outline or vocabulary list and get a downloadable deck ready to present, something a language model alone cannot produce.
Math Diagrams
Geometric figures, function plots, and number lines require precise rendering. Python generates them from equations or descriptions and exports them as images for worksheets or assignments.
Code runs in an isolated sandbox that is automatically reset after it reaches resource limits (memory, execution time, or after the conversation ends). Variables and files created in one turn are not guaranteed to persist to the next. Design your appโs instructions and workflows with this in mind, as each code execution should be self-contained when possible.
Code Execution vs. Code Generation
When the MCP Python Tool is enabled, the AI will attempt to run code rather than just display it. Users will see the actual output (numbers, tables, files) rather than a code block. If you want the AI to show code without running it in specific cases, say so explicitly in your appโs instructions (e.g., โshow the code but do not execute itโ).
Model Compatibility
This is an MCP tool, which requires a model that supports the Model Context Protocol. If a non-MCP model is selected in your app, the tool will be silently unavailable and the AI will fall back to generating code without running it. Always verify your selected model supports MCP before enabling this tool.
No Internet Access in Sandbox
The execution sandbox does not have internet access. Code that attempts to fetch URLs, call external APIs, or download packages will fail. All data processing must use files or data already present in the conversation.
The list below covers commonly used formats. The Python Tool can work with additional file types depending on the task.
File Type
Read
Generate
JSON
โ
โ
XLSX / Excel
โ
โ
CSV
โ
โ
Plain text
โ
โ
DOCX / Word
โ
โ
PPTX / PowerPoint
โ
โ
Is the code execution secure?
Yes. Python code runs in an isolated sandbox with no access to your server, other usersโ data, or the internet. Each execution environment is separate and automatically cleaned up after use.
Can students upload files for the AI to analyze?
Yes. If your app allows file uploads, users can upload spreadsheets or data files and ask the AI to analyze them using Python. The tool can read the uploaded file and return results inline.
What happens if the code has an error?
The AI can see the error output and will typically retry with corrected code automatically. This self-correcting behavior means most minor bugs are resolved without the user needing to intervene.
Can the AI generate files for users to download?
Yes. The AI can generate files (XLSX, CSV, DOCX, PPTX, JSON, etc.) and surface them as downloads in the conversation. This is useful for apps that help teachers produce gradebooks, slide decks, lesson materials, or data exports.
Which organizations have access?
The MCP Python Tool is currently in early access and available to select organizations. Contact support@playlab.ai to request access for your organization.
Can I disable the tool after enabling it?
Yes. You can disable the MCP Python Tool at any time from your appโs Tools settings. The AI will return to generating code descriptions without executing them.
What's the difference between running code and deploying code?
Running code means the AI writes Python and executes it immediately inside a secure, temporary sandbox during your conversation. The code runs once, returns a result (a number, table, file, or chart), and is then discarded. Nothing persists after the conversation ends.Deploying code means publishing code to a server or environment where it runs continuously or on demand over time, like a web app, scheduled job, or API. The MCP Python Tool does not deploy code. It is strictly for in-conversation execution, not for building or hosting persistent applications.
Weโre actively expanding access and improving the MCP Python Tool based on feedback. Reach out to support@playlab.ai for help with setup, troubleshooting, or to request early access for your organization.Last updated: 02-01-2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Playlab Learning Hub","colors":{"primary":"#3B82F6","light":"#60A5FA","dark":"#2563EB"},"logo":{"light":"https://mintcdn.com/playlabai/utDTSOWmKvEQ98EU/images/Playlab_Logo_Full_Black.svg?fit=max\u0026auto=format\u0026n=utDTSOWmKvEQ98EU\u0026q=85\u0026s=d97827114d3fcc02ee8b1933cd33990d","dark":"https://mintcdn.com/playlabai/utDTSOWmKvEQ98EU/images/Playlab_Logo_Full_Paper.svg?fit=max\u0026auto=format\u0026n=utDTSOWmKvEQ98EU\u0026q=85\u0026s=3fe8091c5012462c6a9679c1fcbd8953","href":"https://www.playlab.ai"},"favicon":{"light":"https://mintcdn.com/playlabai/utDTSOWmKvEQ98EU/images/Playlab_Logo_Black_Background_Small_Padding.png?fit=max\u0026auto=format\u0026n=utDTSOWmKvEQ98EU\u0026q=85\u0026s=7facc29acffbc6bdfa6953473a61026e","dark":"https://mintcdn.com/playlabai/utDTSOWmKvEQ98EU/images/Playlab_Logo_Paper_Black_Background.png?fit=max\u0026auto=format\u0026n=utDTSOWmKvEQ98EU\u0026q=85\u0026s=41576e87d0c66007c23406b6b1a84d1e"},"seo":{"metatags":{"og:image":"/images/og-card.png","twitter:image":"/images/og-card.png","twitter:card":"summary_large_image"}},"icons":{"library":"tabler"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"playlabai","hasAudioNarration":false,"actualSubdomain":"playlabai","customDomains":["learn.playlab.ai"],"gitSource":{"type":"github","owner":"playlab-education","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3518d99e0270dac4b465b","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"๐ Feature Documentation","count":54},{"language":"default","tag":"๐ Resources","count":23},{"language":"default","tag":"โ๏ธ Learn on Your Own","count":19},{"language":"default","tag":"โ FAQ","count":16},{"language":"default","tag":"โ๏ธ Changelog","count":8},{"language":"default","tag":"๐ Privacy, Safety \u0026 Compliance","count":8},{"language":"default","tag":"๐ ๏ธ Build \u0026 Collaborate","count":8},{"language":"default","tag":"๐ก Basic Prompting","count":8},{"language":"default","tag":"๐ฃ Building Your App","count":7},{"language":"default","tag":"๐ข Voice, Language \u0026 Accessibility","count":7}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@playlab.ai"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles/v2-badges.css","content":".pl-badges{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 1.25rem}.pl-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;font-family:\"Spline Sans Mono\", ui-monospace, \"SF Mono\", Menlo, monospace;font-size:11px;font-weight:500;line-height:1.5;letter-spacing:0.05em;text-transform:uppercase;white-space:nowrap}.pl-badge--neutral{background-color:#ffffff;color:#4F46E5;border:1px solid #4F46E5}.pl-badge--new{background-color:#4F46E5;color:#ffffff;border:1px solid #4F46E5}"},{"filePath":"styles/audience-tabs.css","content":".pl-audience-tabs [data-component-part=\"tabs-list\"]{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px;border-bottom:0;padding-bottom:0;margin-bottom:2rem}.pl-audience-tabs [data-component-part=\"tab-button\"]{justify-content:center;gap:10px;max-width:none;width:100%;margin-bottom:0;padding:18px 20px;border:2px solid rgb(229 231 235);border-radius:14px;font-size:1.125rem;line-height:1.5rem;white-space:normal;text-align:center;transition:border-color 150ms, background-color 150ms}.pl-audience-tabs [data-component-part=\"tab-button\"]:hover{border-color:rgb(var(--primary) / 0.5)}.pl-audience-tabs [data-component-part=\"tab-button\"][data-active=\"true\"]{border-color:rgb(var(--primary));background-color:rgb(var(--primary) / 0.08)}.pl-audience-tabs .tab-icon{width:26px;height:26px}.dark .pl-audience-tabs [data-component-part=\"tab-button\"]{border-color:rgb(255 255 255 / 0.12)}.dark .pl-audience-tabs [data-component-part=\"tab-button\"]:hover{border-color:rgb(var(--primary-light) / 0.5)}.dark .pl-audience-tabs [data-component-part=\"tab-button\"][data-active=\"true\"]{border-color:rgb(var(--primary-light));background-color:rgb(var(--primary-light) / 0.1)}@media (max-width: 480px){.pl-audience-tabs [data-component-part=\"tabs-list\"]{grid-template-columns:1fr}}"}],"page":{"pagePath":"features/MCP Python Tool","slug":"/features/MCP Python Tool","pageMetadata":{"mode":"wide","title":"MCP python tool","description":"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.","sidebarTitle":"MCP Python Tool","href":"/features/MCP Python Tool"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Card,CardGroup,CodeBlock,Frame,Heading,Note,OptimizedFrame,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedFrame)_missingMdxReference(`OptimizedFrame`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(`div`,{className:`pl-badges`,children:_jsx(`span`,{className:`pl-badge pl-badge--neutral`,children:`๐ Org Only`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`๐งช This feature is currently in early access and available to select organizations.`})}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-this-feature`,children:`What is this feature?`}),`\n`,_jsx(_components.p,{children:`The MCP Python Tool allows AI in your Playlab apps to write and execute real Python code during a conversation. Instead of generating code for users to run elsewhere, the AI writes code, executes it in a secure sandbox, reads the output, and returns the actual result, all within a single turn.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This is an MCP tool. AI models that do not support Model Context Protocol will not be able to execute code when this tool is enabled. Ensure your selected model supports MCP before enabling.`})}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-the-rationale-for-this-feature`,children:`What is the Rationale for this feature?`}),`\n`,_jsx(_components.p,{children:`Language models are probabilistic: they predict likely outputs based on patterns, which makes them powerful for language tasks but unreliable for precise computation. Math, data aggregation, and file generation require deterministic execution, where the same input always produces the same correct output. Python code provides that guarantee. By combining LLM reasoning with actual code execution, the Python Tool lets AI handle the logic and language while Python handles the numbers. This is especially important in education, where grade calculations, data summaries, and generated reports need to be accurate, not approximate.`}),`\n`,_jsx(Heading,{level:`2`,id:`watch-mcp-python-tool-in-action`,children:`Watch MCP Python Tool in Action`}),`\n`,_jsx(OptimizedFrame,{src:`https://drive.google.com/file/d/1M5dZxWXgAEaFhdV7O1CtA9onUabsomsN/preview`,frameborder:`0`,allow:`autoplay`,allowfullscreen:``,style:{width:`100%`,maxWidth:`1200px`,aspectRatio:`16 / 9`,margin:`1.5rem auto`,display:`block`}}),`\n`,_jsx(Heading,{level:`2`,id:`setup-instructions`,children:`Setup Instructions`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Enable the MCP Python Tool`,children:[_jsxs(_components.p,{children:[`Navigate to your appโs `,_jsx(_components.strong,{children:`Tools`}),` panel and, under `,_jsx(_components.strong,{children:`Create \u0026 Share`}),`, toggle on the `,_jsx(_components.strong,{children:`Python Tool`}),`. It will appear in the tools list with a `,_jsx(_components.code,{children:`\u003c >`}),` icon and the description: `,_jsx(_components.em,{children:`โRun code to make calculations, analyse data, create plots, and more (can access CSV, JSON, and XLSX file attachments).โ`})]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=292ab93c57254ed63246ea36d5db42b7`,alt:`Python Tool toggle in app Tools settings`,\"data-og-width\":`814`,width:`814`,\"data-og-height\":`296`,height:`296`,\"data-path\":`images/pythontoggle.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=280\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=465951ef8df66462ec2ab20c40924ee1 280w, https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=560\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=2758fbf8bab5dff3f0fb84341c3cc77b 560w, https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=840\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=877ebbda61abc351f4fb7cdca286a0a9 840w, https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=1100\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=df24d4e23db45c7b2c0a9404dfe23316 1100w, https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=1650\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=5bcaa63c04568e4a766df709c6577f60 1650w, https://mintcdn.com/playlabai/6nNArSaiRQGjqNgU/images/pythontoggle.png?w=2500\u0026fit=max\u0026auto=format\u0026n=6nNArSaiRQGjqNgU\u0026q=85\u0026s=acb287d4b2b65efb03d0cfe266b926fe 2500w`})}),_jsx(Note,{children:_jsxs(_components.p,{children:[`If you do not see the Python Tool option, your organization may not yet have access. Contact `,_jsx(_components.a,{href:`mailto:support@playlab.ai`,children:`support@playlab.ai`}),` to request early access.`]})})]}),_jsxs(Step,{title:`Select an MCP-Compatible Model`,children:[_jsx(_components.p,{children:`Ensure your app is using an AI model that supports MCP tool calls. Recommended models:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Claude Sonnet 4.6`}),`: strong balance of reasoning and execution speed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`GPT 5.4`}),`: excellent for data analysis and structured outputs`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Gemini 3.1 Pro`}),`: high accuracy with complex multi-step computations`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Gemini 3.5 Flash`}),`: frontier-tier coding performance at Flash-tier speed, well suited for multi-step Python workflows`]}),`\n`]}),_jsx(_components.p,{children:`Models that do not support MCP will not be able to use this tool.`})]}),_jsxs(Step,{title:`Add to Your App's Instructions`,children:[_jsxs(_components.p,{children:[`Add lines to your appโs `,_jsx(_components.strong,{children:`Instructions`}),` to help the AI know when and how to use the tool:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You have access to a Python Tool. When users ask questions that involve calculations, data analysis, file processing, or generating structured outputs, use this tool to write and execute Python code. Always show the user what you computed and explain the result in plain language. If the code produces a file, offer it as a download.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsxs(Step,{title:`Test with a Sample Task`,children:[_jsx(_components.p,{children:`Try a query that exercises the tool end-to-end. Good starter prompts:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`โA student scored 78, 84, 91, and 65 on four assignments. What is their average grade?โ`}),`\n`,_jsx(_components.li,{children:`โIโll upload my class roster as a CSV. Can you group students by reading level and count how many are in each group?โ`}),`\n`,_jsx(_components.li,{children:`โGenerate a bar chart of quiz scores by class period and export it as an imageโ`}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-can-it-do`,children:`What Can It Do?`}),`\n`,_jsx(Heading,{level:`3`,id:`sample-workflows`,children:`Sample Workflows`}),`\n`,_jsx(_components.p,{children:`Here are a few ideas to get you started, but donโt stop here. The best way to discover whatโs possible is to play around and experiment. Describe whaat you want and try things youโre not sure will work, and see what happens.`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Grading \u0026 Scoring`,icon:`school`,children:_jsx(_components.p,{children:`Grade calculations require exact arithmetic. The Python Tool computes weighted averages, flags students below thresholds, and exports a formatted gradebook with no rounding errors and no hallucinated scores.`})}),_jsx(Card,{title:`Data Analysis`,icon:`chart-bar`,children:_jsx(_components.p,{children:`LLMs summarize data in words; Python actually counts it. Upload attendance records or survey results and get real aggregates grouped, filtered, and sorted correctly every time.`})}),_jsx(Card,{title:`Report Generation`,icon:`file-export`,children:_jsx(_components.p,{children:`Generating a structured XLSX or CSV from data is not something a language model can do reliably on its own. The Python Tool writes and runs the code that builds the file and hands it back as a download.`})}),_jsx(Card,{title:`Math \u0026 Computation`,icon:`calculator`,children:_jsx(_components.p,{children:`Multi-step calculations are where LLMs drift. Python executes them exactly, useful for checking student work, running statistical analyses, or computing results that need to be verifiably correct.`})}),_jsx(Card,{title:`Data Visualization`,icon:`chart-line`,children:_jsx(_components.p,{children:`Charts require precise data bindings that LLMs cannot render. Python generates accurate bar charts, line graphs, and scatter plots from real data and exports them as images ready to use in slides or handouts.`})}),_jsx(Card,{title:`Lesson Material Generation`,icon:`presentation`,children:_jsx(_components.p,{children:`Turn a structured outline or dataset into a formatted .docx with headers, tables, and content blocks. Teachers get an editable Word file, not a block of text to copy and paste.`})}),_jsx(Card,{title:`PowerPoint Generation`,icon:`presentation`,children:_jsx(_components.p,{children:`Python builds .pptx files with real slide structure. Feed it a lesson outline or vocabulary list and get a downloadable deck ready to present, something a language model alone cannot produce.`})}),_jsx(Card,{title:`Math Diagrams`,icon:`math-symbols`,children:_jsx(_components.p,{children:`Geometric figures, function plots, and number lines require precise rendering. Python generates them from equations or descriptions and exports them as images for worksheets or assignments.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`important-behavior-changes`,children:`Important Behavior Changes`}),`\n`,_jsx(Accordion,{title:`Sandbox Resets After Limits`,id:`sandbox-resets-after-limits`,children:_jsx(_components.p,{children:`Code runs in an isolated sandbox that is automatically reset after it reaches resource limits (memory, execution time, or after the conversation ends). Variables and files created in one turn are not guaranteed to persist to the next. Design your appโs instructions and workflows with this in mind, as each code execution should be self-contained when possible.`})}),`\n`,_jsx(Accordion,{title:`Code Execution vs. Code Generation`,id:`code-execution-vs-code-generation`,children:_jsxs(_components.p,{children:[`When the MCP Python Tool is enabled, the AI will attempt to `,_jsx(_components.em,{children:`run`}),` code rather than just display it. Users will see the actual output (numbers, tables, files) rather than a code block. If you want the AI to show code without running it in specific cases, say so explicitly in your appโs instructions (e.g., โshow the code but do not execute itโ).`]})}),`\n`,_jsx(Accordion,{title:`Model Compatibility`,id:`model-compatibility`,children:_jsx(_components.p,{children:`This is an MCP tool, which requires a model that supports the Model Context Protocol. If a non-MCP model is selected in your app, the tool will be silently unavailable and the AI will fall back to generating code without running it. Always verify your selected model supports MCP before enabling this tool.`})}),`\n`,_jsx(Accordion,{title:`No Internet Access in Sandbox`,id:`no-internet-access-in-sandbox`,children:_jsx(_components.p,{children:`The execution sandbox does not have internet access. Code that attempts to fetch URLs, call external APIs, or download packages will fail. All data processing must use files or data already present in the conversation.`})}),`\n`,_jsx(Heading,{level:`2`,id:`frequently-asked-questions`,children:`Frequently Asked Questions`}),`\n`,_jsxs(Accordion,{title:`What file types are supported?`,id:`what-file-types-are-supported`,children:[_jsx(_components.p,{children:`The list below covers commonly used formats. The Python Tool can work with additional file types depending on the task.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`File Type`}),_jsx(_components.th,{children:`Read`}),_jsx(_components.th,{children:`Generate`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`JSON`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`XLSX / Excel`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`CSV`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plain text`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`DOCX / Word`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`PPTX / PowerPoint`}),_jsx(_components.td,{children:`โ `}),_jsx(_components.td,{children:`โ `})]})]})]})]}),`\n`,_jsx(Accordion,{title:`Is the code execution secure?`,id:`is-the-code-execution-secure`,children:_jsx(_components.p,{children:`Yes. Python code runs in an isolated sandbox with no access to your server, other usersโ data, or the internet. Each execution environment is separate and automatically cleaned up after use.`})}),`\n`,_jsx(Accordion,{title:`Can students upload files for the AI to analyze?`,id:`can-students-upload-files-for-the-ai-to-analyze`,children:_jsx(_components.p,{children:`Yes. If your app allows file uploads, users can upload spreadsheets or data files and ask the AI to analyze them using Python. The tool can read the uploaded file and return results inline.`})}),`\n`,_jsx(Accordion,{title:`What happens if the code has an error?`,id:`what-happens-if-the-code-has-an-error`,children:_jsx(_components.p,{children:`The AI can see the error output and will typically retry with corrected code automatically. This self-correcting behavior means most minor bugs are resolved without the user needing to intervene.`})}),`\n`,_jsx(Accordion,{title:`Can the AI generate files for users to download?`,id:`can-the-ai-generate-files-for-users-to-download`,children:_jsx(_components.p,{children:`Yes. The AI can generate files (XLSX, CSV, DOCX, PPTX, JSON, etc.) and surface them as downloads in the conversation. This is useful for apps that help teachers produce gradebooks, slide decks, lesson materials, or data exports.`})}),`\n`,_jsx(Accordion,{title:`Which organizations have access?`,id:`which-organizations-have-access`,children:_jsxs(_components.p,{children:[`The MCP Python Tool is currently in early access and available to select organizations. Contact `,_jsx(_components.a,{href:`mailto:support@playlab.ai`,children:`support@playlab.ai`}),` to request access for your organization.`]})}),`\n`,_jsx(Accordion,{title:`Can I disable the tool after enabling it?`,id:`can-i-disable-the-tool-after-enabling-it`,children:_jsx(_components.p,{children:`Yes. You can disable the MCP Python Tool at any time from your appโs Tools settings. The AI will return to generating code descriptions without executing them.`})}),`\n`,_jsxs(Accordion,{title:`What's the difference between running code and deploying code?`,id:`whats-the-difference-between-running-code-and-deploying-code`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Running code`}),` means the AI writes Python and executes it immediately inside a secure, temporary sandbox during your conversation. The code runs once, returns a result (a number, table, file, or chart), and is then discarded. Nothing persists after the conversation ends.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Deploying code`}),` means publishing code to a server or environment where it runs continuously or on demand over time, like a web app, scheduled job, or API. The MCP Python Tool does not deploy code. It is strictly for in-conversation execution, not for building or hosting persistent applications.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`need-support`,children:`Need Support?`}),`\n`,_jsxs(_components.p,{children:[`Weโre actively expanding access and improving the MCP Python Tool based on feedback. Reach out to `,_jsx(_components.a,{href:`mailto:support@playlab.ai`,children:`support@playlab.ai`}),` for help with setup, troubleshooting, or to request early access for your organization.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`Last updated: 02-01-2026`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"mode":"wide","title":"MCP python tool","description":"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.","sidebarTitle":"MCP Python Tool","href":"/features/MCP Python Tool"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is this feature?","slug":"what-is-this-feature","depth":2,"children":[]},{"title":"What is the Rationale for this feature?","slug":"what-is-the-rationale-for-this-feature","depth":2,"children":[]},{"title":"Watch MCP Python Tool in Action","slug":"watch-mcp-python-tool-in-action","depth":2,"children":[]},{"title":"Setup Instructions","slug":"setup-instructions","depth":2,"children":[]},{"title":"What Can It Do?","slug":"what-can-it-do","depth":2,"children":[{"title":"Sample Workflows","slug":"sample-workflows","depth":3,"children":[]}]},{"title":"Important Behavior Changes","slug":"important-behavior-changes","depth":2,"children":[]},{"title":"Frequently Asked Questions","slug":"frequently-asked-questions","depth":2,"children":[]},{"title":"Need Support?","slug":"need-support","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"playlabai","siteName":"Playlab Learning Hub","title":"MCP python tool - Playlab Learning Hub","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T13:35:41.232Z","originalFileLocation":"features/MCP Python Tool.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Playlab Learning Hub\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"MCP python tool - Playlab Learning Hub\">\u003cmeta data-mint-head property=\"og:description\" content=\"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Playlab Learning Hub\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://learn.playlab.ai/features/MCP Python Tool\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://playlabai.mintlify.site/images/og-card.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"MCP python tool - Playlab Learning Hub\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://playlabai.mintlify.site/images/og-card.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/playlabai/OSQmfqyUom3Qa98V/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Playlab Learning Hub\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B82F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://learn.playlab.ai/features/MCP Python Tool\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/features/MCP%20Python%20Tool.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://learn.playlab.ai/#organization\",\"name\":\"Playlab Learning Hub\",\"url\":\"https://learn.playlab.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/playlabai/utDTSOWmKvEQ98EU/images/Playlab_Logo_Full_Black.svg?fit=max\u0026auto=format\u0026n=utDTSOWmKvEQ98EU\u0026q=85\u0026s=d97827114d3fcc02ee8b1933cd33990d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://learn.playlab.ai#website\",\"name\":\"Playlab Learning Hub\",\"url\":\"https://learn.playlab.ai\",\"publisher\":{\"@id\":\"https://learn.playlab.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool#webpage\",\"url\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool\",\"name\":\"MCP python tool\",\"description\":\"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\",\"dateModified\":\"2026-10-21T13:35:41.232Z\",\"isPartOf\":{\"@id\":\"https://learn.playlab.ai#website\"},\"breadcrumb\":{\"@id\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"โช AI Tools (MCP)\",\"item\":\"https://learn.playlab.ai/features/MCP%20tools\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MCP python tool\",\"item\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool#article\",\"headline\":\"MCP python tool\",\"name\":\"MCP python tool\",\"description\":\"Execute Python code directly in your Playlab conversations for data analysis, file generation, computation, and so much more.\",\"url\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool\",\"mainEntityOfPage\":{\"@id\":\"https://learn.playlab.ai/features/MCP%20Python%20Tool#webpage\"},\"image\":\"https://learn.playlab.ai/images/og-card.png\",\"dateModified\":\"2026-10-21T13:35:41.232Z\",\"publisher\":{\"@id\":\"https://learn.playlab.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://learn.playlab.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Playlab Learning Hub\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Playlab Learning Hub\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/features/MCP%20Python%20Tool.md","siteName":"Playlab Learning Hub","nav":{"global":null,"tabs":[{"tab":"๐ Learn Live with Us","pages":[{"title":"๐ Learn Live with Us","href":"/introduction"}]},{"tab":"โ๏ธ Learn on Your Own","pages":[{"title":"โ๏ธ Learn on Your Own","href":"/getstarted/Overview"}]},{"tab":"๐ Feature Documentation","groups":[{"group":"Overview","pages":[{"mode":"wide","title":"Overview","sidebarTitle":"Overview","href":"/features/Overview"},{"mode":"wide","title":"Glossary","sidebarTitle":"Glossary","href":"/features/Glossary"}]},{"group":"๐ Recently Added","pages":[{"mode":"wide","title":"Playlab Assistant","sidebarTitle":"Playlab Assistant","tag":"New","href":"/features/Playlab Assistant"},{"mode":"wide","title":"App privacy and visibility","sidebarTitle":"App Privacy","tag":"New","href":"/features/App Privacy and Visibility"},{"mode":"wide","title":"Sharing with individuals","sidebarTitle":"Share with Individuals","tag":"New","href":"/features/Sharing with Individuals"},{"mode":"wide","title":"Sharing with groups and orgs","sidebarTitle":"Share with Groups and Orgs","tag":"New","href":"/features/Sharing with Groups and Orgs"},{"mode":"wide","title":"Share with Collections","sidebarTitle":"Share with Collections","tag":"New","href":"/features/collections/What are Collections"},{"mode":"wide","title":"Managing apps in a Collection","sidebarTitle":"Managing Apps","tag":"New","href":"/features/collections/Managing Apps in a Collection"},{"mode":"wide","title":"Using an app across multiple classes","sidebarTitle":"Share Apps to a Space","tag":"New","href":"/features/Cross-Space App Use"},{"mode":"wide","title":"Space member activity and member detail page","sidebarTitle":"Member Detail","tag":"New","href":"/features/Space Member Detail"},{"mode":"wide","title":"Organization-level insights","sidebarTitle":"Org-Level Insights","tag":"New","href":"/features/Org-Level Insights"},{"mode":"wide","title":"Exporting activity data","sidebarTitle":"Exporting Activity Data","tag":"New","href":"/features/Exporting Activity Data"},{"mode":"wide","title":"Responsible organization","sidebarTitle":"Responsible Organization","tag":"New","href":"/features/Responsible Organization"}]},{"group":"๐ Privacy \u0026 Permissions","pages":[{"mode":"wide","title":"App privacy and visibility","sidebarTitle":"App Privacy","tag":"New","href":"/features/App Privacy and Visibility"},{"mode":"wide","title":"Responsible organization","sidebarTitle":"Responsible Organization","tag":"New","href":"/features/Responsible Organization"},{"mode":"wide","title":"Organization permissions and roles","sidebarTitle":"Organization Permissions","href":"/features/Org Permissions and Roles"},{"mode":"wide","title":"Space roles and permissions","sidebarTitle":"Space Roles","href":"/features/Space Roles and Permissions"}]},{"group":"๐ค Sharing \u0026 Publishing","pages":[{"mode":"wide","title":"Publishing your app","sidebarTitle":"Publishing","href":"/features/Publishing"},{"mode":"wide","title":"Sharing with individuals","sidebarTitle":"Share with Individuals","tag":"New","href":"/features/Sharing with Individuals"},{"mode":"wide","title":"Sharing with groups and orgs","sidebarTitle":"Share with Groups and Orgs","tag":"New","href":"/features/Sharing with Groups and Orgs"},{"mode":"wide","title":"Using an app across multiple classes","sidebarTitle":"Share Apps to a Space","tag":"New","href":"/features/Cross-Space App Use"}]},{"group":"๐๏ธ Collections","pages":[{"mode":"wide","title":"Share with Collections","sidebarTitle":"Share with Collections","tag":"New","href":"/features/collections/What are Collections"},{"mode":"wide","title":"Creating and sharing a Collection","sidebarTitle":"Creating a Collection","href":"/features/collections/Creating and Sharing a Collection"},{"mode":"wide","title":"Managing apps in a Collection","sidebarTitle":"Managing Apps","tag":"New","href":"/features/collections/Managing Apps in a Collection"},{"mode":"wide","title":"Using a shared Collection","sidebarTitle":"Using a Shared Collection","href":"/features/collections/Using a Shared Collection"},{"mode":"wide","title":"Curating a great Collection","sidebarTitle":"Curating a Collection","href":"/features/collections/Curating a Collection"}]},{"group":"๐ข Spaces","pages":[{"mode":"wide","title":"Creating and managing a space","sidebarTitle":"Creating a Space","href":"/getstarted/Creating Your Own Space"},{"mode":"wide","title":"App Status Designations","sidebarTitle":"App Status Designations","href":"/features/Organizing Workspaces"},{"mode":"wide","title":"Using an app across multiple classes","sidebarTitle":"Share Apps to a Space","tag":"New","href":"/features/Cross-Space App Use"}]},{"group":"๐ Activity \u0026 Insights","pages":[{"mode":"wide","title":"Centralized org monitoring and flags","sidebarTitle":"Centralized Monitoring","href":"/features/Reviewing App Activity"},{"mode":"wide","title":"Space member activity and member detail page","sidebarTitle":"Member Detail","tag":"New","href":"/features/Space Member Detail"},{"mode":"wide","title":"Organization-level insights","sidebarTitle":"Org-Level Insights","tag":"New","href":"/features/Org-Level Insights"},{"mode":"wide","title":"Exporting activity data","sidebarTitle":"Exporting Activity Data","tag":"New","href":"/features/Exporting Activity Data"},{"mode":"wide","title":"Export to Docx","sidebarTitle":"Export to Docx","href":"/features/Exporting to Docx"},{"mode":"wide","title":"Export to Google Drive","sidebarTitle":"Export to Google Drive","href":"/features/Exporting to Google Drive"}]},{"group":"๐ฃ Building Your App","pages":[{"mode":"wide","title":"Playlab Assistant","sidebarTitle":"Playlab Assistant","tag":"New","href":"/features/Playlab Assistant"},{"title":"AI Assisted Builder","mode":"wide","sidebarTitle":"AI Assisted Builder","href":"/features/AI assisted builder"},{"title":"Selecting an LLM","mode":"wide","sidebarTitle":"Selecting an LLM","tag":"Updated","href":"/features/Selecting an LLM"},{"mode":"wide","title":"Adding starter inputs","sidebarTitle":"Starter Inputs","href":"/getstarted/Adding Starter Inputs"},{"mode":"wide","title":"Welcome message","sidebarTitle":"Welcome Message","href":"/features/Optional welcome message"},{"mode":"wide","title":"Forking Conversations","sidebarTitle":"Forking Conversations","href":"/features/forking conversations"},{"mode":"wide","title":"Document editor","sidebarTitle":"Document Editor","href":"/features/Doc Editor"}]},{"group":"๐ Personalizing App Behavior","pages":[{"mode":"wide","title":"Adaptive Memory","sidebarTitle":"Adaptive Memory","href":"/features/Adaptive Memory"},{"mode":"wide","title":"User Profiles","sidebarTitle":"User Profiles","href":"/features/User Profiles"},{"mode":"wide","title":"Avoid answer generation","sidebarTitle":"Avoid Answer Generation","href":"/features/Avoid Answer Generation"},{"mode":"wide","title":"Knowledge graph tools","sidebarTitle":"Knowledge Graph Tools","href":"/features/Knowledge Graphs"}]},{"group":"๐ต References \u0026 Curriculum","pages":[{"mode":"wide","title":"Organization Reference Library","sidebarTitle":"Organization Reference Library","href":"/features/Organizational References"},{"mode":"wide","title":"Pinned References","sidebarTitle":"Pinned References","href":"/features/Pinned References"},{"title":"State standards knowledge graph tool in Playlab","mode":"wide","sidebarTitle":"State Standards Knowledge Graph Tool in Playlab","href":"/features/MCP Standards"},{"mode":"wide","title":"Illustrative Mathematics Guide","sidebarTitle":"Illustrative Mathematics Guide","href":"/features/Building with Illustrative Mathematics"}]},{"group":"๐ข Voice, Language \u0026 Accessibility","pages":[{"mode":"wide","title":"Voice inputs","sidebarTitle":"Voice Inputs","href":"/features/Voice Input"},{"mode":"wide","title":"Voice output","sidebarTitle":"Voice Output","href":"/features/Voice Output"},{"mode":"wide","title":"Voice Dictation Guide","sidebarTitle":"Voice Dictation Guide","href":"/features/Using Dictation"},{"mode":"wide","title":"Spanish Mode","sidebarTitle":"Spanish Mode","href":"/features/Spanish Mode"},{"mode":"wide","title":"Modo Espaรฑol","sidebarTitle":"Modo Espaรฑol","href":"/features/Modo Espanol"},{"mode":"wide","title":"Math inputs","sidebarTitle":"Math Inputs","href":"/features/Math Inputs"},{"mode":"wide","title":"Camera handwriting input","sidebarTitle":"Camera Handwriting Input","tag":"Beta","href":"/features/Camera Handwriting Input"}]},{"group":"โช AI Tools (MCP)","pages":[{"title":"Model context protocol (MCP) in Playlab","mode":"wide","description":"Building infrastructure to make AI more reliable for Education.","sidebarTitle":"Model Context Protocol (MCP) in Playlab","href":"/features/MCP tools"},{"mode":"wide","title":"MCP python tool","sidebarTitle":"MCP Python Tool","href":"/features/MCP Python Tool"},{"mode":"wide","title":"Improving referencing with agentic search tool","description":"Enhanced reference retrieval through AI-powered search tools that provide more precise and contextual access to your uploaded documents","sidebarTitle":"Improving Referencing with Agentic Search Tool","href":"/features/MCP RAG"},{"title":"Illustrative Mathematics knowledge graph tool in Playlab","mode":"wide","sidebarTitle":"Illustrative Mathematics Knowledge Graph Tool in Playlab","href":"/features/MCP IMKG"}]},{"group":"๐ด Safety \u0026 Feedback","pages":[{"mode":"wide","title":"Building Safely in Playlab","sidebarTitle":"Building Safely in Playlab","href":"/getstarted/Building Safely"},{"mode":"wide","title":"Safety moderation for organizations","sidebarTitle":"Safety Moderation for Organizations","tag":"Updated","href":"/features/Safety and Moderation Updates"},{"mode":"wide","title":"Safety moderation for apps","sidebarTitle":"Safety Moderation for Apps","href":"/features/Escalating Flagged Conversations"},{"mode":"wide","title":"Student status and ages","sidebarTitle":"Student Status and Ages","href":"/features/Student Status and Ages"},{"mode":"wide","title":"Submit Your Feedback","sidebarTitle":"Submit Your Feedback","href":"/features/Submitting Feedback"}]}]},{"tab":"โ๏ธ Changelog","pages":[{"title":"โ๏ธ Changelog","href":"/changelog/Playlab Q4 2026 Update"}]},{"tab":"๐ Resources","pages":[{"title":"๐ Resources","href":"/resources/aipolicies"}]},{"tab":"โ FAQ","pages":[{"title":"โ FAQ","href":"/faq/FAQ"}]}]},"basePath":"","title":"MCP python tool - Playlab Learning Hub","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}